import { createRouter, createWebHashHistory } from 'vue-router'
import Home from '../views/Home.vue'

const routes = [
  {
    path: '/',
    name: 'Home',
    component: Home,
    redirect: './navigation',
    children: [
      {
        path: 'navigation',
        name: 'Navigation',
        meta: {
          title: '导航面板'
        },
        component: () => import('@/views/Navigation')
      },
      {
        path: 'softconfig',
        name: 'SoftConfig',
        meta: {
          title: '软件配置'
        },
        component: () => import('@/views/SoftConfig')
      }
    ]
  }
]

const router = createRouter({
  history: createWebHashHistory(),
  routes
})

export default router
